package com.chester.eurekaconsumerfeign.controller;

import com.chester.eurekaconsumerfeign.client.HelloClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author chester7cheng
 */
@RestController
@RequestMapping("/hello")
public class HelloController {
    @Autowired
    private HelloClient helloClient;

    @GetMapping("/{name}")
    public String name(@PathVariable("name") String name){
        return helloClient.hello(name);
    }
}
